{% extends "base.html" %}

{% block body %}

{% if success %}
google reader账户授权成功， <a href="/">投递设置</a>
{% elif auth_method == 'oauth' %}

{% if fail %}
<strong class="error">授权失败！</strong> <a href="/auth">重新授权</a>
{% else %}
点击下面链接完成授权：<br />
<a href="{{authorize_url}}">{{ authorize_url }}</a>

<p><a href="/auth">&lt;&lt;返回重新选择</a>
{% end %}

{% else %}
<form action="" method="post">
    <fieldset id="kindle_fieldset">
        <legend>授权Google Reader账户</legend>
        {% if fail %}<strong class="error">用户名或密码有误！</strong> {% end %}
        <p>
            <label>用户名</label><br />
            <input type="text" name="username" size="20" value="{% if gr and hasattr(gr, 'username') and gr.username %}{{ gr.username }}{% end %}" />
        </p>
        <p>
            <label>密码</label><br />
            <input type="password" name="password" size="20" value="" />
        </p>
        <p>
            <input type="submit" class="btn" value="保存" />
        </p>
        <p><a href="/auth">&lt;&lt;返回重新选择</a>
    </fieldset>
</form>
{% end %}

{% end %}